//
//  NewTuiGuangTableViewCell.m
//  wangzhe
//
//  Created by 李 佳伟 on 2018/3/29.
//  Copyright © 2018年 李 佳伟. All rights reserved.
//

#import "NewTuiGuangTableViewCell.h"
#import "JTCSM.h"
@implementation NewTuiGuangTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        CGFloat space = 20;
        CGFloat changeSpace = 5;
//        1.52381
        CGFloat imageVWidth = (KSCREENWidth-2*space-4*changeSpace)/3;
        CGFloat imageVHeight = imageVWidth*1.52381;
        for (int i = 0 ; i <3 ; i++) {
            UIImageView *imageV = [[UIImageView alloc]initWithFrame:CGRectMake(space+changeSpace+i*(imageVWidth+changeSpace), changeSpace, imageVWidth, imageVHeight)];
            imageV.tag = 100+i;
            [self.contentView addSubview:imageV];
        }
        [df newlineViewWithHeightofTop:changeSpace*2+imageVHeight superView:self.contentView spacing:0 color:[UIColor clearColor] lineHeight:changeSpace];
    }
    return self;
}

- (void)setValueWithModel:(id)model{
    for (int i = 0; i <3; i++) {
        UIImageView *imageV = [self.contentView viewWithTag:100+i];
        imageV.image = [UIImage imageNamed:model];
    }
}

@end
